package com.homework.ch06;


public class Test {
    public static void main(String[] args) {
        // 获取单例对象
        Singleton s1 = Singleton.getInstance();
        Singleton s2 = Singleton.getInstance();

        s1.doSomething();

        // 验证是同一个对象
        System.out.println(s1 == s2); // 输出：true
    }
}

